export function ParamsPrecondition(func: (...args: any[]) => any[]) {
    return (target: any, key: string, decorators: any): any => {
        let pastValue = decorators.value;
        function newValue(..._args: any[]) {
            // @ts-ignore
            let temp = pastValue.bind(this);
            let newArgs = func(..._args);
            let _result = temp(...newArgs);
            return _result;   
        }
        decorators.value = newValue;
    };
}